:root {
  /* Modern Bright Color Palette */
  --primary: #3b82f6;
  --primary-light: #60a5fa;
  --primary-dark: #2563eb;
  --secondary: #ec4899;
  --secondary-light: #f472b6;
  --secondary-dark: #db2777;
  --success: #10b981;
  --success-light: #34d399;
  --success-dark: #059669;
  
  /* Bootstrap variable overrides */
  --bs-nav-pills-link-active-bg: #3b82f6;
  --bs-nav-pills-link-active-color: white;
  --bs-nav-link-color: #3b82f6;
  --bs-nav-link-hover-color: #2563eb;
  --danger: #ef4444;
  --danger-light: #f87171;
  --danger-dark: #dc2626;
  --warning: #f59e0b;
  --warning-light: #fbbf24;
  --warning-dark: #d97706;
  --info: #06b6d4;
  --info-light: #22d3ee;
  --info-dark: #0891b2;
  --background: #ffffff;
  --background-alt: #f9fafb;
  --surface: #ffffff;
  --text: #1f2937;
  --text-light: #6b7280;
  --text-dark: #111827;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --border-dark: #d1d5db;

  /* Semantic Colors */
  --color-fg-added: var(--success);
  --color-fg-removed: var(--danger);
  --color-fg-changed: var(--warning);
  --color-fg-conflict: var(--secondary);
  --color-uri-octicon: var(--primary);
  --color-uri-link: var(--primary-dark);
  --color-bg-added: #ecfdf5;
  --color-bg-removed: #fef2f2;
  --color-bg-changed: #fffbeb;
  --color-bg-unknown: #eff6ff;
  --color-bg-conflict: #fff3cd;
  --color-policy-text: #be185d;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  
  /* Typography */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-bs-theme="dark"] {
  --primary: #60a5fa;
  --primary-light: #93c5fd;
  --primary-dark: #3b82f6;
  --secondary: #f472b6;
  --secondary-light: #fb7185;
  --secondary-dark: #ec4899;
  --success: #34d399;
  --success-light: #6ee7b7;
  --success-dark: #10b981;
  
  /* Bootstrap variable overrides for dark mode */
  --bs-nav-pills-link-active-bg: #60a5fa;
  --bs-nav-pills-link-active-color: white;
  --bs-nav-link-color: #60a5fa;
  --bs-nav-link-hover-color: #93c5fd;
  --danger: #f87171;
  --danger-light: #fca5a5;
  --danger-dark: #ef4444;
  --warning: #fbbf24;
  --warning-light: #fcd34d;
  --warning-dark: #f59e0b;
  --info: #22d3ee;
  --info-light: #67e8f9;
  --info-dark: #06b6d4;
  --background: #111827;
  --background-alt: #1f2937;
  --surface: #1f2937;
  --text: #f9fafb;
  --text-light: #e5e7eb;
  --text-dark: #f3f4f6;
  --border: #374151;
  --border-light: #4b5563;
  --border-dark: #6b7280;
  
  --color-policy-text: #f9a8d4;
  --color-uri-octicon: #60a5fa;
  --color-uri-link: #93c5fd;
}


/* Fix code elements in dark mode */
[data-bs-theme="dark"] code {
  background-color: #374151;
  color: #e5e7eb;
  border: 1px solid #4b5563;
}

/* Fix dropdown menus in dark mode */
[data-bs-theme="dark"] .dropdown-menu {
  background-color: #1f2937;
  border: 1px solid #374151;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .dropdown-item {
  color: #f9fafb;
}

[data-bs-theme="dark"] .dropdown-item:hover {
  background-color: #374151;
  color: #f9fafb;
}

[data-bs-theme="dark"] .dropdown-item:focus {
  background-color: #374151;
  color: #f9fafb;
}

[data-bs-theme="dark"] .dropdown-item:active {
  background-color: #4b5563;
  color: #f9fafb;
}

[data-bs-theme="dark"] .dropdown-divider {
  border-color: #374151;
}

[data-bs-theme="dark"] .bg-light {
  background-color: #2d3748 !important;
}

/* Global Styles */
body {
  font-family: var(--font-sans);
  color: var(--text);
  background-color: var(--background-alt);
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

pre {
  margin-bottom: 0;
}

/* Layout */
.main-app {
  padding: 75px 0 var(--spacing-lg) 0;
}


/* Fix for btn-light in dark mode */
[data-bs-theme="dark"] .btn-light {
  background-color: #374151;
  color: #f9fafb;
  border-color: #4b5563;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes expandWidth {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 100%;
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn var(--transition-slow);
}


/* Utilities */
.overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.gray-out {
  opacity: 0.5;
  pointer-events: none;
}

.geojson-map-wrapper {
  height: 400px;
  width: 100%;
}

.geojson-map-container {
  height: 100%;
  width: 100%;
}

/* Dark mode badge fix for ReadOnlyBadge */
[data-bs-theme="dark"] .badge.bg-light, [data-bs-theme="dark"] .badge.bg-light.text-dark, [data-bs-theme="dark"] .badge.text-dark {
  background-color: #374151 !important;
  color: #f9fafb !important;
  border: 1px solid #6b7280 !important;
  box-shadow: 0 1px 2px 0 rgba(0,0,0,0.2);
}